<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/produceinfo/produce_use_mx/q_produce_use_mx.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/produceinfo/produce_use_mx/q_produce_use_mx.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '领用单明细',
                name: 'produce_use_mx/q_produce_use_mx',
                url: "/q_produce_use_mx/",
                sortName: "领用单号"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"领用单号":"","配件库位":"","配件编码":"","配件名称":"","生产状态":""});
            const searchFormOptions = ref([[{"title":"领用单号","field":"领用单号"},{"title":"配件编码","field":"配件编码","type":"like"},{"title":"配件名称","field":"配件名称","type":"like"},{"dataKey":"库位编码","data":[],"title":"配件库位","field":"配件库位","type":"select"},{"dataKey":"生产状态","data":[],"title":"生产状态","field":"生产状态","type":"select"}]]);
            const columns = ref([{field:'ID',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'领用单号',title:'领用单号',type:'string',width:140,align:'left',sort:true},
                       {field:'产品编码',title:'产品编码',type:'string',width:110,hidden:true,align:'left'},
                       {field:'产品名称',title:'产品名称',type:'string',width:220,hidden:true,require:true,align:'left'},
                       {field:'产品数量',title:'产品数量',type:'float',width:110,hidden:true,align:'left'},
                       {field:'配件库位',title:'配件库位',type:'string',bind:{ key:'库位编码',data:[]},width:120,align:'left'},
                       {field:'配件编码',title:'配件编码',type:'string',width:110,align:'left'},
                       {field:'配件名称',title:'配件名称',type:'string',width:220,align:'left'},
                       {field:'配件数量',title:'配件数量',type:'float',width:110,align:'left'},
                       {field:'配件规格',title:'配件规格',type:'string',width:110,align:'left'},
                       {field:'平均成本',title:'平均成本',type:'float',width:110,align:'left'},
                       {field:'配件成本金额',title:'配件成本金额',type:'float',width:110,align:'left'},
                       {field:'无税成本',title:'无税成本',type:'decimal',width:110,align:'left'},
                       {field:'kid',title:'kid',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'生产状态',title:'生产状态',type:'int',bind:{ key:'生产状态',data:[]},width:80,align:'left'},
                       {field:'生产工位',title:'生产工位',type:'string',bind:{ key:'生产工位',data:[]},width:110,align:'left'},
                       {field:'成本计算',title:'成本计算',type:'int',bind:{ key:'成本核算方式',data:[]},width:80,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
